Skip to main content

All Questions

Tagged with
0votes
1answer
397views

Filter products on category AND tag

I want to be able to filter products based on category AND tag, as well as sub category AND tag. From my research I heard that I must write some kind of rewrite rule in functions.php for this to be ...
Fernando Redondo's user avatar
0votes
1answer
121views

Get posts that do not have the same tags as current

I'm trying to get all posts in a custom plugin loop that DO NOT share the same tag as the current one. I'm trying: $events = tribe_get_events([ 'start_date' => 'now', 'eventDisplay' =&...
Eli Nathan's user avatar
0votes
1answer
672views

Get posts that match defined arrays of tags

I've been scratching my head a lot and couldn't find a reasonable solution that would not require multiple queries. In my case, the posts have multiple tags, but they can be divided into to "sets" ...
Andy's user avatar
1vote
0answers
34views

Get link which associated with a specific category and tag

We have 500+ post, 60+ tags, 3 categories. We want to give link on header part which have specific one category and one tag. For example: We have multiple post like: Blanket, Blender, Mixer, Wardrobe ...
Ravi G's user avatar
2votes
2answers
786views

Query all posts and not repeat the same tag

I need a query to show all posts in the site but not repeat the ones with same tag, I mean only show one post with the same tag. My current query is <?php $paged = (get_query_var('...
Mr.CAT's user avatar
0votes
1answer
363views

How to only fetch certain Tag ID's

I have this PHP script to fetch tags (as we use WordPress as a CMS, the tags are "categories" for our partners).... However, I'm trying to free up "tags" to be used on blog posts - but currently the ...
Dan Hawkins's user avatar
1vote
1answer
4kviews

How to build a WP_Query using mulitple tags and using AND or OR operator between them

I'd like to craft a query to return posts based on the conditional presence of certain tags. The pseudo query is: return posts with "((tagA OR tagB) AND (tagX OR tagY))". But I'm having issues ...
John's user avatar
0votes
1answer
76views

Make tag archive display post are ordered by post format

I would like to set up an archive page for tags where posts are displayed separated depending on post format, first post-format-aside then an archive with all posts except the posts already displayed, ...
HannesH's user avatar
0votes
2answers
104views

No duplicate tags by category

I have script to show list tags from category and works very well. <ul class="inline-list"> <?php query_posts('category_name=lain-lain'); if (...
Kholis.net's user avatar
0votes
2answers
1kviews

Creating attachments archive in tags and categories

Per this question (How to create an attachments archive with working pagination?), I've been using the following function to have archive pages display attachments as well as pages and posts. It was ...
tshynik's user avatar
-1votes
1answer
359views

How to do query_posts on tags pages

So I am using the tags.php on my WordPress site to create special featured pages; what I would like to do is create a featured area on the index of every page that contains the first five posts. I ...
Lukadadiani's user avatar
0votes
2answers
1kviews

Wordpress query_posts by tag doesn't work anymore(?)

I had this code running fine forever. Some days ago it just started outputting nothing (just the <ul></ul>). No errors in logs: <ul style="margin-left:0"> <?php query_posts('tag=...
MultiformeIngegno's user avatar
1vote
1answer
694views

Display posts with tag that matches current post title

How would I show posts that have a tag who's name matches the title of the current post? For example if you are on a post called "Hippo" at the bottom of the page I would like posts with the tag "...
Sam's user avatar
  • 157
1vote
1answer
6kviews

Filter query_posts by tag slug on "Tag Archive" page (when tag is 2 or more words)

I'm using the following to bring up a tag archive page: <?php query_posts( "tag=". '' . single_tag_title( '', false ) . '' ); ?> This works perfectly for all tags of one word only, but any tags ...
KingLiNoodles's user avatar
0votes
2answers
1kviews

Conditionals if tags exist?

I have the following code to display tagged articles with the same name as the page title, but I only want the to appear if the tag exists, otherwise it just says 'Related Articles' with no content. ...
Phill's user avatar

153050per page
close